package com.javafamily.bean;


import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Data
// 使用自动建表
@Entity
// 不需要转化为json的属性
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler", "fieldHandler"})
public class Pets {
    // 表示当前属性为自动建的表的主键
    @Id
    // 主键自动递增
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private String name;
}
